<%@page import="org.springframework.security.core.context.SecurityContextHolder"%>
<%@page import="org.apache.commons.lang.StringUtils"%>
<%@page import="org.apache.commons.lang.time.DateFormatUtils"%>
<%@page import="org.springframework.util.CollectionUtils"%>
<%@page import="java.util.Collection"%>
<%@ include file="../common/common_include.jsp"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<%
	FaqForm form = (FaqForm)request.getAttribute("command");
	String userName = SecurityContextHolder.getContext().getAuthentication().getName();
	String nowDate = DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm:ss");
	TblOaFaq faq = (TblOaFaq)request.getAttribute("faq");
%>



		<div>

				<form id="faqFORM" name="form" target="coreIframe"
					action="<%=request.getContextPath()%>/faq/doEdit" method="post" enctype="multipart/form-data">
					<div class="breadcrumb">
						<div class="bcIcon"></div>
						<ul class="bcNav">

							<li>编辑FAQ</li>
						</ul>


					</div>
					<input type="hidden" value="<%=faq.getFaqId() %>" name="faqId">
					<table class="formTable">
						<tr>
							<td class="tdTitle">FAQ类型:</td>
							<td>
								<select name="faqClass">
									<option value="常见问题" <%=faq.getFaqClass().equalsIgnoreCase("常见问题")?"selected='selected'":""%>>常见问题</option>
									<option value="服务指南" <%=faq.getFaqClass().equalsIgnoreCase("服务指南")?"selected='selected'":""%> >服务指南</option>
								</select>
							</td>
						</tr>
						
						<tr>
							<td class="tdTitle">发布时间:</td>
							<td><input class="inputText xs" type="text"
								name="publicTime" checkNull="true" value="<%=nowDate%>"
								onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" /></td>
						</tr>
						<tr>
							<td class="tdTitle">发布人:</td>
							<td><input class="inputText xs" type="text" name="publicMan" checkNull="true" value="<%=faq.getPublicMan()%>" /></td>
						</tr>		
						<tr>
							<td class="tdTitle">问题:</td>
							<td><input class="inputText xs" type="text" name="faqQuestion" checkNull="true" placeholder="请输入标题" value="<%=faq.getFaqQuestion() %>" />
							<span class="errorTipWrap" id="errorTip_faqQuestion"></span>
							</td>
						</tr>
						<tr>
							<td class="tdTitle">答案：</td>
							<td class="" colspan="2">
								<div style="padding-top:10px;padding-bottom:10px;">
								<textarea id="content" name="faqAnswer" 
								style="width: 700px; height: 200px; visibility: hidden;"><%=faq.getFaqAnswer() %></textarea>
								</div>
								<span class="errorTipWrap" id="errorTip_faqAnswer"></span>
							</td>
						</tr>
						<tr>
							<td class="tdTitle"></td>
							<td>
								<div>
									<input class="input-btn-microsoft" type="submit" value="提交">
									<a class="a-btn-microsoft" href="javascript:XF.Faq.manageFaq()">取消</a>
								</div>
							</td>
						</tr>	
					</table>
				</form>
			</div>
	<iframe name="coreIframe" style="display: none"></iframe>

<script type="text/javascript">
$(function(){
	XF.createKindEditor("content");
	$("input[name=faqQuestion]").focus();
});
	

</script>